<?php
/* SVN FILE: $Id: fees.php 260 2010-01-21 22:38:54Z supersmashbrothers $ */
/**
* ibMarket 2
* IP.Board 3.0
* Transfer ACP - fees
*
* @author $Author: supersmashbrothers $
* @copyright $Copyright$
* @version $Revision: 260 $
* @lastrevision $Date: 2010-01-21 22:38:54 +0000 (Thu, 21 Jan 2010) $
* @modifiedby $LastChangedBy: supersmashbrothers $
* @lastmodified $LastChangedDate: 2010-01-21 22:38:54 +0000 (Thu, 21 Jan 2010) $
* @filesource $URL: http://ipb-ibmarket.googlecode.com/svn/ibmarket2/trunk/admin/applications_addon/other/ibmarket/plugins/transfer/adminAction/fees.php $
*/


if ( ! defined( 'IN_ACP' ) )
{
	print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
	exit();
}

class plugin_admin_transfer_fees extends ipsCommand
{
	/**
	 * Skin object
	 *
	 * @access	private
	 * @var		object			Skin templates
	 */
	private $html;
	
	/**
	 * Main class entry point
	 *
	 * @access	public
	 * @param	object		ipsRegistry reference
	 * @return	void		[Outputs to screen]
	 */
	public function doExecute( ipsRegistry $registry )
	{
		$this->html = marketRegistry::loadTemplate('cp_skin_plugin_transfer');
		
		$this->registry->getClass('class_localization')->loadLanguageFile( array( 'transfer_transfer' ) );
		
		$redirect = array(
								'manage' => 'manageFees',
								'add' => 'addFee',
								'insert' => 'insertFee',
								'edit' => 'editFee',
								'update' => 'updateFee',
								'delete' => 'deleteFee',
							);
		
		if(!$redirect[$this->request['do']])
		{
			$this->request['do'] = 'manage';
		}
		
		$function = $redirect[$this->request['do']];
		$this->$function();
		
		/* Output */
		$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
		$this->registry->output->sendOutput();			
	}
	
	private function manageFees()
	{
		$this->registry->output->html = $this->html->manageFees();
	}
}